<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
</body>
<script type="text/javascript">
    function createCar(name,qualified,price,specification)
    {
        var obj = new Object();
        obj.name = name;
        obj.qualified = qualified;
        obj.price = price;
        obj.specification = specification;

        obj.say = function()
        {
            document.write("我是一辆" + this.name + "，我有" + this.qualified + "，我的" + this.price + "为50万元" + "，我也有" + this.specification);
        };
        return obj;//obj作为函数的返回值
    }
    var car1=createCar("车","合格证","建议零售价","说明书");
    car1.say();
</script>
</html>